# Contributor: Thomas Kienlen <kommander@laposte.net>
# Maintainer: Thomas Kienlen <kommander@laposte.net>
pkgname=kiwix-desktop
pkgver=2.3.1
pkgrel=4
pkgdesc="Offline Wikipedia reader"
url="https://github.com/kiwix/kiwix-desktop"
# ppc64le, s390x, riscv64 and loongarch64 blocked by qt5-qtwebengine
arch="all !armhf !ppc64le !s390x !riscv64 !loongarch64"
license="GPL-3.0-or-later"
makedepends="
	qt5-qtbase-dev
	qt5-qtwebengine-dev
	qt5-qtsvg-dev
	qt5-qtimageformats
	libkiwix-dev>=13.0
	"
source="https://github.com/kiwix/kiwix-desktop/archive/$pkgver/kiwix-desktop-$pkgver.tar.gz
	1b322d8f01c787846546a6473f153cf1daa41e65.patch
	ab80463b58a40f035555810d79bd60d67f0f1ee3-backported.patch
	238bd534a4f99ee331823e8ec2766c21999098c4.patch
	a01ab015f9c7da3342fd9f31c201cbdb34e8c5a9.patch
	"
options="!check" # no test suite

build() {
	qmake-qt5 PREFIX="/usr"
	make
}

package() {
	INSTALL_ROOT="$pkgdir" make install
}

sha512sums="
09d4c2293fc36ac0b03c815474f5f60881093552fd7d1d0940858254c16d7b6021bd05f4f985b32401328705082f07fbd72e92f79bb1365650f5dd75d455f0b8  kiwix-desktop-2.3.1.tar.gz
7422a08e1a68ae9e907bdd02d3c22162cd14acfdc7e2d04a57efff22a909e0bb552b45f37efbe22801f30119bc0a7a999f37384d78e4280f1897ae9a62ca361f  1b322d8f01c787846546a6473f153cf1daa41e65.patch
3a411c1218626b04b3279978a925f2c722b20b0e692adbc3e62b705337eebb8bc83a1148ff1d40f89b2a04452bad164e4cc1e6c598e2d87ed43cc6f621a633ae  ab80463b58a40f035555810d79bd60d67f0f1ee3-backported.patch
bca1b6cd2171377bd874464bf8fd6292af24b46328c9b2fb61c702e54a4794cdd6dd4c5243e4101acbd15b1272c43fb1f4118a2cf6cf301d9d8126d50f2ae754  238bd534a4f99ee331823e8ec2766c21999098c4.patch
7a6ebcdb9f66c75b1d224b1c70426e4e4f55acd83b1063b64410a4da8c4136d4b1e2f95c9f1d0422a83c2c06af8d87b85598ce5fb7d5c5aca5a9d5634ec090c3  a01ab015f9c7da3342fd9f31c201cbdb34e8c5a9.patch
"
